package org.setec.config;

import org.setec.utils.xml.XMLUtils;

import java.util.ArrayList;
import java.util.List;

public class JoinPoint {

    private String methodName;
    private String[] argClassNames;
    private List invalidateDetails = new ArrayList();

    public JoinPoint() {
    }

    public JoinPoint(String methodSignature) {
        methodName = XMLUtils.findFirst(methodSignature, "^[a-zA-Z0-0]+");
        argClassNames = methodSignature.replaceAll(methodName + "|\\(|\\)| ", "").split(",");
    }

    public String getMethodName() {
        return methodName;
    }

    public void setMethodName(String methodName) {
        this.methodName = methodName;
    }

    public String[] getArgClassNames() {
        return argClassNames;
    }

    public void setArgClassNames(String[] argClassNames) {
        this.argClassNames = argClassNames;
    }

    public List getInvalidateDetails() {
        return invalidateDetails;
    }

    public void setInvalidateDetails(List invalidateDetails) {
        this.invalidateDetails = invalidateDetails;
    }
}
